package com.bruce.demo1.principles.demo2.lsp.demo1;

/**
 * @PROJECT_NAME design_patterns
 * @DESCRIPTION 正方形类
 * @AUTHOR CNBruceLee
 * @DATE 2021/6/20 13:16
 */
public class Square extends Rectangle {
    @Override
    public void setLength(double length) {
        super.setLength(length);
        super.setWidth(length);
    }

    @Override
    public void setWidth(double width) {
        super.setWidth(width);
        super.setLength(width);
    }
}
